<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    // 1. π
    // var pi = Math.PI;
    // console.log(pi);
    // 2. abs():绝对值（正数的绝对值等于它本身，负数的绝对值等于它的相反数）
    // console.log(Math.abs(100));
    // 3. ceil:向上取整
    // var num1 = 5.000001;
    // console.log(Math.ceil(num1));
    // 4. floor:向下取整
    // var num2 = 9.99;
    // console.log(Math.floor(num2));
    // 5. round:四舍五入
    // var num3 = 3.45;
    // console.log(Math.round(num3));
    // 6. random():获取大于或等于0.0且小于1.0的随机值
    // var num4 = Math.random();
    // console.log(num4);
  </script>
</body>
</html>